package models

import "github.com/jinzhu/gorm"

//时间戳的结构,供其他结构引用
type BaseMode struct {
	CreatedAt   int
	UpdatedAt int
}
func (base *BaseMode) BeforeCreate(scope *gorm.Scope) error {
	//scope.SetColumn("CreatedAt", time.Now().Unix())
	//scope.SetColumn("UpdatedAt", time.Now().Unix())
	return nil
}

func (base *BaseMode) BeforeUpdate(scope *gorm.Scope) error {
	//scope.SetColumn("UpdatedAt", time.Now().Unix())
	return nil
}
